//
//  BaseScrollView.swift
//  DYSwiftFramework
//
//  Created by huangdeyu on 2021/10/18.
//  Copyright © 2021 none. All rights reserved.
//

import Foundation
import UIKit
import SnapKit

class BaseScrollView: UIScrollView {
    
    var contentView: UIView?
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setup()
    }
    
    init() {
        super.init(frame: CGRect.zero)
    }
    
    
    func setup() {
        if #available(iOS 11.0, *) {
            contentInsetAdjustmentBehavior = .never
        } else {
            // Fallback on earlier versions
        }
        alwaysBounceVertical = true
        showsVerticalScrollIndicator = false
        contentView = UIView.init()
        addSubview(contentView!)
        contentView?.snp.makeConstraints({ (make) in
            make.edges.equalTo(self)
            make.width.equalTo(self)
        })
        
    }
    
}


